<%= javascript_include_tag "prototype", "effects", "controls", "window", "application","dragdrop"%>
<%= stylesheet_link_tag "main", :media => "all" %>
<body onunload="$('load').src='/images/progress.gif'">
<table border="0" cellpadding="0" cellspacing="0" class="medblack" align="center">
	<tr>
		<td colspan="2">&nbsp;</td>
	</tr>
	<tr>
		<td colspan="2"><strong><% if flash[:notice] -%> <%= flash[:notice] %>
		<%else -%>
		<li>图片上传(小于50k)</li>
		<% end -%> </strong></td>
	</tr>
	<tr>
		<%= form_tag({:controller=>"info",:action =>'save_picture',:id=>@id,:object=>@object}, :multipart=> true) %>
		<td colspan="2" align="center"><%= file_field "picture", "picture"%></td>
	</tr>
	<tr>
		<td colspan="2">&nbsp;</td>
	</tr>
	<tr>
		<td colspan="2" id="picture" align="center">
		<div class="out">
		<div class="in">
		<div><img id="load"
			src=<%=url_for(:controller=>"index",:action=>"post_picture",:id=>@id)%> />
		</div>
		</div>
		</div>
		</td>
	</tr>
	<tr>
		<td colspan="2">&nbsp;</td>
	</tr>
	<tr>
		<td align="center"><%= submit_tag "上传图片", :onClick=>"$('load').src='/images/upload.gif'"%></td>
		<%= end_form_tag %>
		<%= form_tag%>
		<td align="center"><%= submit_tag " 关  闭 ", :onClick=>"window.opener.document.getElementById('myimage').src='"+url_for(:controller=>'index',:action=>'post_picture',:id=>@id)+"';window.opener.document.getElementById('mylink').href='"+url_for(:controller=>'info', :action => 'upload_picture',:id=>@id,:object=>@object)+"';self.close();"%></td>
		<%= end_form_tag %>
	</tr>
</table>
<%= draggable_element("load", :revert => true)%>
</body>
